package com.intermancer.predictor.gene.logic;

import com.intermancer.predictor.data.Channel;
import com.intermancer.predictor.data.ConsumeResponse;
import com.intermancer.predictor.data.Quantum;

public class ComparisonSwitchLG extends AbstractLogicGene {

	@Override
	public int getOffsetsSize() {
		return 4;
	}

	@Override
	public ConsumeResponse consumeInternal(Quantum quantum) {
		if(compare(getValues()[0], getValues()[1])) {
			quantum.addChannel(new Channel(this, getValues()[2]));
		} else {
			quantum.addChannel(new Channel(this, getValues()[3]));
		}
		return null;
	}

}
